package com.ylbh.modules.newinfo.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ylbh.modules.newinfo.entity.ShoppingNewsClass;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 *
 * 新闻分类
 * @author czx
 * @date 2019-04-11 12:47:25
 */
@Mapper
@Repository
public interface ShoppingNewsClassMapper extends BaseMapper<ShoppingNewsClass> {

    /**
     * 获取新闻分类列表
     * @param keywords
     * @param page
     * @return
     */
    List<ShoppingNewsClass> selectNewsClassList(@Param(value = "keywords")String keywords, Page page);

    /**
     * 根据id查看新闻分类详情
     * @param id
     * @return
     */
    ShoppingNewsClass selectNewClassById(@Param(value = "id")String id);

    /**
     * 修改新闻分类
     * @param shoppingNewsClass
     */
    void updateNewClass(@Param(value = "shoppingNewsClass")ShoppingNewsClass shoppingNewsClass);

    /**
     * 新增新闻分类
     * @param shoppingNewsClass
     */
    void insertNewClass(@Param(value = "shoppingNewsClass")ShoppingNewsClass shoppingNewsClass);

    /**
     * 删除新闻分类
     * @param list
     */
    void deleteNewClass(@Param(value = "list")List<String> list);

    /**
     * 查询出key最大的一列
     * @return
     */
    String selectMaxClassKey();
}
